package com.itjin.model.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.itjin.handler.ListStringTypeHandler;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;
import java.util.List;
import lombok.Data;

/**
 * 
 * @TableName user
 */
@TableName(value = "user")
@Data
public class User {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String username;

    /**
     * 
     */
    private String userAccount;

    /**
     * 
     */
    private String avatar;

    /**
     * 
     */
    private Integer gender;

    /**
     * 
     */
    private String userPassword;

    /**
     * 
     */
    private String phone;

    /**
     * 
     */
    private String email;

    /**
     * 
     */
    private Integer userStatus;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private Date lastLoginTime;

    /**
     * 
     */
    @TableLogic
    @TableField("isDelete")
    private Integer isDelete;

    /**
     * 角色管理：1-普通用户 2-VIP用户
     * 0-管理员
     */
    private Integer userRole;

    /**
     * 个人简介
     */
    private String biography;

    private Integer myPublish;

    private Integer myPraised;

    private Integer myCollection;

    private Integer myFans;

    private Integer myFollows;

    /**
     * 用户学力积分
     */
    private Integer myCoins;

    /**
     * 用户个人标签（不超过五个）
     */
    @TableField(typeHandler = ListStringTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<String> tags;
}